<?php

namespace app\api\validate;

use think\Validate;

class CustomerReconciliationValidate extends Validate
{
    use ValidateModelExist;

    protected $rule = [
        'customer_id' => 'require|exist:user',
        'set_account_id' => 'require|exist:setAccount',
        'account_type_id' => 'require|exist:accountType',
        'business_time' => 'require',
        'amount' => 'require',
        'payment_mode' => 'require'
    ];

    protected $scene = [
        'adjustment'  =>  ['customer_id','amount', 'business_time'],
        'receipt' => ['customer_id', 'set_account_id', 'account_type_id', 'business_time', 'amount'],
        'quick' => ['customer_id', 'set_account_id', 'account_type_id', 'amount', 'payment_mode']
    ];
}
